//
//  NetworkTool.m
//  kuaiyi
//
//  Created by Alphts on 16/7/5.
//  Copyright © 2016年 Alphts. All rights reserved.
//

#import "NetworkTool.h"

@implementation NetworkTool


+ (instancetype)shareManager{
    
    static NetworkTool *instance;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
        
        //设置超时时间
        config.timeoutIntervalForRequest = 10.0;
        
        instance = [[NetworkTool alloc] initWithBaseURL:nil sessionConfiguration:config];
        
        //可接受格式
        instance.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html", nil];
        
        
    });
    return instance;
}



@end
